import request from '/@/utils/request';

/**
 * 修改类目编号
 * @param categoryForm 
 * @returns 
 */
export function categoryUpdate(categoryForm: object) {
	return request({
		url: '/productCategory/update',
		method: 'post',
		data: categoryForm,
	});
}

/**
 * 
 * @param sellerId 获取商家所有商品类目
 * @returns 
 */
export function categoryList(sellerId: string) {
    return request({
		url: '/productCategory/list/' + sellerId,
		method: 'get',
	});
}

/**
 * 删除商品类目
 * @param categoryIds 
 * @returns 
 */
export function deleteCategory(categoryIds:number[]) {
    return request({
		url: '/productCategory/delete',
		method: 'delete',
		data: categoryIds
	});
}

/**
 * 
 * @param name 模糊查询商品类目
 * @returns 
 */
export function findlike(name:string) {
    return request({
		url: '/productCategory/findlike/'+ name,
		method: 'get',
	});
}